﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using HZ.DrugTrade.Model;

namespace HZ.DrugTrade.IBLL
{
    /// <summary>
    /// 有关业务逻辑接口
    /// </summary>
    public interface IBLL_SelectRelation
    {


        /// <summary>
        /// 是否可删除可配送（尚未开始采购）
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        bool CheckCanDelRelation(string UserID);
        
        /// <summary>
        /// 根据采购目录编号获取配送信息
        /// </summary>
        /// <param name="ProcureCatalogID">采购目录编号</param>
        /// <returns>配送信息</returns>
        IList<SelectRelation> GetAllSelectRelation(string ProcureCatalogID);
        
        /// <summary>
        /// 获取条数
        /// </summary>
        /// <returns></returns>
        int GetSelectRelationCount();

        /// <summary>
        /// 根据配送企业编号获取配送信息
        /// </summary>
        /// <param name="ProcureCatalogID">配送企业编号</param>
        /// <returns>配送信息</returns>
        IList<SelectRelation> GetAllSelectRelationByCompanyPSID(string CompanyID_PS);


        /// <summary>
        /// 增加
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int AddSelectRelation(HZ.DrugTrade.Model.SelectRelation selectRelation, string ProjectID);


        /// <summary>
        /// 批量增加
        /// </summary>
        /// <param name="lst"></param>
        /// <param name="arrayResult"></param>
        /// <returns></returns>
        int AddSelectRelation(IList<Model.SelectRelation> lst,object ProjectID,out int[] arrayResult);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int UpdateSelectRelation(HZ.DrugTrade.Model.SelectRelation selectRelation);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int UpdateSelectRelation(IList<Model.SelectRelation> lst);
        
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int UpdateSelectRelation(string strCompanyID_TB);

        /// <summary>
        /// 更新:更新可配送状态
        /// </summary>
        /// <param name="strCompanyID_TB"></param>
        /// <returns></returns>
        int UpdateSelectRelation(string strCompanyID_TB, int status);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int DeleteSelectRelation(HZ.DrugTrade.Model.SelectRelation selectRelation);

        int DeleteSelectRelationByAdmin(HZ.DrugTrade.Model.SelectRelation selectRelation);

        /// <summary>
        /// 配送关系
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetSelectRelationByProcureCatalogID(string strWhere, int currentPage, int pageSize, out int totalRecord);

        /// <summary>
        /// 配送关系确认
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetSelectRelationToConfirm(string strWhere, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 配送关系确认
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetSelectRelationToConfirm2(string strWhere, int currentPage, int pageSize, out int totalRecord);


        int UpdateCompanyInfoCheckStatus(string strCompanyID, int checkstatus, bool temp);

        /// <summary>
        /// 配送关系确认
        /// </summary>
        /// <returns></returns>
        DataTable GetAreaDistribution();

        
        /// <summary>
        /// 检查
        /// </summary>
        /// <returns></returns>
        DataTable GetEspeciallyRelationShip();

        
        /// <summary>
        /// 更新:校正查因COOKIE导致的异常数据
        /// </summary>
        /// <returns></returns>
        int UpdateEspeciallyRelationShip();

        
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="selectRelation"></param>
        /// <returns></returns>
        int UpdateSelectRelationAuditStatus(IList<Model.SelectRelation> lst);

                /// <summary>
        /// 据配送企业得到生产企业的id
        /// </summary>
        /// <param name="cmpPSId"></param>
        /// <returns></returns>
        string GetCmpSCByCmpPSId(string cmpPSId);
         /// <summary>
        /// 企业提交申请删除配送关系
        /// add by Meng 2013-04-10
        /// </summary>
        /// <param name="srelation"></param>
        /// <returns></returns>
        int GetDelRequestDelete(HZ.DrugTrade.Model.SelectRelation srelation);
    }
}
